Imports CrystalDecisions.CrystalReports.Engine

Public Class FrmCrTonTienMat
    Private customerReport As ReportDocument
    Private nam As String


    Private Sub FormCrTonTienMat_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        moduleUtils.setDinhDangVietNam()
        Dim sqlQuery As String = "SELECT * FROM tbl_dot_tontienmat WHERE recycleID LIKE '" & nam & "%' AND (tiendauky<>0 or tienThu <> 0 OR tienChi <> 0 OR tienTon <> 0) ORDER BY recycleID"
        Dim reportPath = Application.StartupPath & "\" & "CrTonTienMat.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleReportConfig.GetDataTable(sqlQuery))
        customerReport.SetParameterValue("company", globalVariale.COMPANY)
        customerReport.SetParameterValue("address", globalVariale.ADDRESS)
        Me.crTonTienMatView.ReportSource = customerReport
    End Sub

    Public Sub setNam(ByVal s As String)
        nam = s
    End Sub
End Class